package com.blog.blogservice.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonInclude;

/**
 * 标签表(Label)实体类
 *
 * @author guanglin.ma
 * @since 2024-03-02 23:25:50
 */
@JsonInclude(value = JsonInclude.Include.NON_NULL)
@TableName(value = "label")
public class Label extends AdminClass {
    private static final long serialVersionUID = 908925508978124594L;

    public static final String FIELD_LABEL_ID = "labelId";
    public static final String FIELD_LABEL_NAME = "labelName";
    public static final String FIELD_LABEL_DESCRIPTION = "labelDescription";

    @TableId(type = IdType.AUTO)
    private Integer labelId;

    /**
     * 标签名称
     */
    private String labelName;

    /**
     * 标签名称
     */
    private String labelCode;

    /**
     * 标签描述
     */
    private String labelDescription;

    public Label(Integer labelId, String labelName, String labelDescription) {
        this.labelId = labelId;
        this.labelName = labelName;
        this.labelDescription = labelDescription;
    }

    @Override
    public String toString() {
        return "Label{" +
                "labelId=" + labelId +
                ", labelName='" + labelName + '\'' +
                ", labelCode='" + labelCode + '\'' +
                ", labelDescription='" + labelDescription + '\'' +
                '}';
    }

    public Label() {
    }

    public Integer getLabelId() {
        return labelId;
    }

    public void setLabelId(Integer labelId) {
        this.labelId = labelId;
    }

    public String getLabelName() {
        return labelName;
    }

    public void setLabelName(String labelName) {
        this.labelName = labelName;
    }

    public String getLabelDescription() {
        return labelDescription;
    }

    public void setLabelDescription(String labelDescription) {
        this.labelDescription = labelDescription;
    }

    public String getLabelCode() {
        return labelCode;
    }

    public void setLabelCode(String labelCode) {
        this.labelCode = labelCode;
    }

    public static Label.LabelBuilder builder() {
        return new Label.LabelBuilder();
    }

    public static class LabelBuilder {

        private Integer labelId;
        private String labelName;
        private String labelDescription;

        public Label build() {
            return new Label(this.labelId, this.labelName, this.labelDescription);
        }

        public Label.LabelBuilder labelId(Integer labelId) {
            this.labelId = labelId;
            return this;
        }

        public Label.LabelBuilder labelName(String labelName) {
            this.labelName = labelName;
            return this;
        }

        public Label.LabelBuilder labelDescription(String labelDescription) {
            this.labelDescription = labelDescription;
            return this;
        }
    }

}

